.top{
    height: 70px;
    width: 100%;
    margin-left: 0;
    background: palevioletred;
    position: fixed;
    top: 0;
    margin-bottom: 5px;
}
.top ul{
    width: auto;
    list-style-type: none;
    white-space: nowrap;
    overflow: hidden;
    margin-left: 5%;
    padding: 0;
}

.top li{
    float: left;
    margin-right: 2%;
    position: relative;
    overflow: hidden;
}
.top li a{
    display: block;
    color: white;
    text-align: center;
    padding: 3px;
    overflow: hidden;
    text-decoration: none;
}

.top li a:hover{
    background-color: hotpink;
}

.top ul li ul{
    /* 设置二级菜单 */
    margin-left: 0;
    background:palevioletred;
    position: relative;
    display: none; /* 默认隐藏二级菜单的内容 */

}
.top ul li ul li{
    /* 二级菜单li内容的显示 */

    float:none;
    text-align: center;
}
.top ul li:hover ul{
    /* 鼠标选中二级菜单内容时 */
    display: block;
}
body{
    background:pink;
    margin-left: 0;
}
.body{
    margin-top: 300px;
}